import request from '@/utils/request'
/**
 * (WipProcess)表实体类
 *
 * @author makejava
 * @since 2025-01-11 01:12:21
 */

export const entityPut={
    id: null,  //ID
    processNo: null,  //工序编号
    processName: null,  //工序名称
    orderNo: null,  //序号
    productId: null,  //product_id
    createTime: null,  //创建时间
    createBy: null,  //创建人
    updateTime: null,  //更新时间
    updateBy: null,  //更新人
    processType: null,  //工序类型
}
export const entityPo={
    id: null,  //ID
    processNo: null,  //工序编号
    processName: null,  //工序名称
    orderNo: null,  //序号
    productId: null,  //product_id
    createTime: null,  //创建时间
    createBy: null,  //创建人
    updateTime: null,  //更新时间
    updateBy: null,  //更新人
    processType: null,  //工序类型
}
export const tableList =[
    {
        type: "selection",
        prop: "id",
        header_align: "left",
        align: "left",
        fixed: "left",
        width: 40,
        min_width: 40,
        sortable: true,
        resizable: true,
        show_overflow_tooltip: true,
        show: true
    },
    {
        type: "default",
        label: "工序编号",
        prop: "processNo",
        header_align: "left",
        align: "left",
        fixed: false,
        width: 180,
        min_width: 180,
        sortable: "custom",
        resizable: true,
        show_overflow_tooltip: true,
        show: true,
        search: "Input"
    },
    {
        type: "default",
        label: "工序名称",
        prop: "processName",
        header_align: "left",
        align: "left",
        fixed: false,
        width: 180,
        min_width: 180,
        sortable: "custom",
        resizable: true,
        show_overflow_tooltip: true,
        show: true,
        search: "Input"
    },
    {
        type: "default",
        label: "序号",
        prop: "orderNo",
        header_align: "left",
        align: "left",
        fixed: false,
        width: 180,
        min_width: 180,
        sortable: "custom",
        resizable: true,
        show_overflow_tooltip: true,
        show: true,
        search: "Input"
    },
    {
        type: "default",
        label: "工序类型",
        prop: "processType",
        header_align: "left",
        align: "left",
        fixed: false,
        width: 180,
        min_width: 180,
        sortable: "custom",
        resizable: true,
        show_overflow_tooltip: true,
        show: true,
        search: "Input"
    },
    {
        type: "default",
        label: "创建时间",
        prop: "createTime",
        header_align: "left",
        align: "left",
        fixed: false,
        width: 180,
        min_width: 180,
        sortable: "custom",
        resizable: true,
        show_overflow_tooltip: true,
        show: true,
        search: "Input"
    },
    {
        type: "default",
        label: "创建人",
        prop: "createBy",
        header_align: "left",
        align: "left",
        fixed: false,
        width: 180,
        min_width: 180,
        sortable: "custom",
        resizable: true,
        show_overflow_tooltip: true,
        show: true,
        search: "Input"
    },
    {
        type: "default",
        label: "更新时间",
        prop: "updateTime",
        header_align: "left",
        align: "left",
        fixed: false,
        width: 180,
        min_width: 180,
        sortable: "custom",
        resizable: true,
        show_overflow_tooltip: true,
        show: true,
        search: "Input"
    },
    {
        type: "default",
        label: "更新人",
        prop: "updateBy",
        header_align: "left",
        align: "left",
        fixed: false,
        width: 180,
        min_width: 180,
        sortable: "custom",
        resizable: true,
        show_overflow_tooltip: true,
        show: true,
        search: "Input"
    },
]
export const editList =[
    {
        show: false,
        type: "hidden",
        label: "id",
        key: "id",
        span: 24
    },
    {
        show: true,
        type: "Input",
        label: "工序编号",
        key: "processNo",
        span: 12,
        data:{}
    },
    {
        show: true,
        type: "Input",
        label: "工序名称",
        key: "processName",
        span: 12,
        data:{}
    },
    {
        show: true,
        type: "Input",
        label: "序号",
        key: "orderNo",
        span: 12,
        data:{}
    },
    {
        show: true,
        type: "Select",
        label: "工序类型",
        key: "processType",
        span: 12,
        data:[
            {
                name:"生产",
                value: "生产"
            },
            {
                name:"质检",
                value: "质检"
            },
            {
                name:"外协",
                value: "外协"
            },
            {
                name:"成品入库",
                value: "成品入库"
            }
        ]
    },
]
export const PageMix={
    records:[],
    total: 0,
    size: 10,
    current: 1,
    orderItem: "update_time",
    ascending: false,
    queryEntity: {
        id: null,  //ID
        processNo: null,  //工序编号
        processName: null,  //工序名称
        orderNo: null,  //序号
        productId: null,  //product_id
        delFlag: null,  //逻辑删除标记
        createTime: null,  //创建时间
        createBy: null,  //创建人
        updateTime: null,  //更新时间
        updateBy: null,  //更新人
        processType: null,  //工序类型
    },
    queryJSON: {
                id: "id",  //ID
                processNo: "processNo",  //工序编号
                processName: "processName",  //工序名称
                orderNo: "orderNo",  //序号
                productId: "productId",  //product_id
                delFlag: "delFlag",  //逻辑删除标记
                createTime: "createTime",  //创建时间
                createBy: "createBy",  //创建人
                updateTime: "updateTime",  //更新时间
                updateBy: "updateBy",  //更新人
                processType: "processType",  //工序类型
    },
    likeSomeWord: null,
    betweenItem: "updateTime",
    betweenStart: null,
    betweenEnd: null
}

export function list() {
    return request({
        url: "/wip/wipProcess",
        method: 'get'
    })
}
export function getById(id) {
    return request({
        url: "/wip/wipProcess/" + id,
        method: 'get'
    })
}
export function findList(entityQuery) {
    return request({
        url: "/wip/wipProcess/findList",
        method: 'post',
        data: entityQuery
    })
}
export function findOne(entityQuery) {
    return request({
        url: "/wip/wipProcess/findOne",
        method: 'post',
        data: entityQuery
    })
}
export function pageMix(pageMix) {
    return request({
        url: "/wip/wipProcess/pageMix",
        method: 'post',
        data: pageMix
    })
}
export function pageMixJoin(pageMix) {
    return request({
        url: "/wip/wipProcess/pageMixJoin",
        method: 'post',
        data: pageMix
    })
}
export function insert(entityPut) {
    entityPut.id=null;
    return request({
        url: "/wip/wipProcess",
        method: 'put',
        data: entityPut
    })
}
export function update(entityPut) {
    return request({
        url: "/wip/wipProcess/update",
        method: 'put',
        data: entityPut
    })
}
export function del(ids) {
    return request({
        url: "/wip/wipProcess/" + ids,
        method: 'delete'
    })
}
export function deleteDeep(ids) {
    return request({
        url: "/wip/wipProcess/deep/" + ids,
        method: 'delete'
    })
}
export function findListByPartNo(partNo) {
    return request({
        url: "/wip/wipProcess/findListByPartNo",
        method: 'post',
        params: {
            "partNo":partNo
        }
    })
}